package com.ilop.sthome.ui.activity.main;

import com.example.common.base.BaseBindActivity;
import com.ilop.sthome.app.MyApplication;
import com.ilop.sthome.common.CommonId;
import com.siterwell.familywellplus.R;
import com.siterwell.familywellplus.databinding.ActivityDebugBinding;

/**
 * @author skygge
 * @date 2020/5/26.
 * GitHub：javofxu@github.com
 * email：skygge@yeah.net
 * description：
 */
public class DebugActivity extends BaseBindActivity<ActivityDebugBinding> {

    private String mMsg;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_debug;
    }

    @Override
    protected void initialize() {
        super.initialize();
        mMsg = getIntent().getStringExtra(CommonId.KEY_MESSAGE);
    }

    @Override
    protected void initView() {
        super.initView();
        mDBind.tvDebug.setText(mMsg);
    }

    @Override
    protected void initListener() {
        super.initListener();
        mDBind.ivDebugBack.setOnClickListener(v -> {
            MyApplication.allActivityRemove();
            System.exit(0);
        });
    }

    @Override
    public void onBackPressed() {
        MyApplication.allActivityRemove();
        System.exit(0);
    }
}
